package com.itheima.config;

import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

//声明他是一个配置类
//@Configuration
//扫描注解
//@ComponentScan("com.itheima") 扫描这个包下所有的子文件夹
//@ComponentScan({"com.itheima.dao","com.itheima.service"}) 扫描指定文件夹
//@ComponentScan(value = {"com.itheima.dao","com.itheima.service"}) 同上
//扫描中，排除指定的类
//excludeFilters：排除
    //type:排除类型:5种      FilterType.ANNOTATION:按照注解类型排除
    //value:排出的项
//@ComponentScan(value = "com.itheima",
//        excludeFilters = @ComponentScan.Filter(
//             type = FilterType.ANNOTATION,
//             value = Service.class
//        ))
//@ComponentScan("com.itheima")
////@PropertySource加载properties配置文件
////@PropertySource({"classpath:jdbc.properties"})
////@Import:导入配置信息
//@Import({JdbcConfig.class})
@Configuration
@ComponentScan("com.itheima")
//@PropertySource：加载类路径jdbc.properties文件
@PropertySource("classpath:jdbc.properties")
@Import({JdbcConfig.class,MybatisConfig.class})
public class SpringConfig {
}
